package com.smartstate.IOC.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode
@ApiModel(description = "分页查询DTO")
public class PageDTO <DTO>{

    @ApiModelProperty(value = "当前页数")
    protected long page;
    @ApiModelProperty(value = "查询条数")
    protected long size;
    @ApiModelProperty(value = "查询条件对象DTO")
    DTO dto;

    public PageDTO(long page, long size) {
        this.page = page;
        this.size = size;
    }
    public PageDTO() {
        //默认查询第1页前10条
        this.page = 1;
        this.size = 10;
    }
}
